Optimal. Leaf size=71 \[ -\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {3 A \sin (e+f x) \cos (e+f x)}{8 a^2 c^2 f}+\frac {3 A x}{8 a^2 c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3588, 73, 639, 199, 205} \[ -\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {3 A \sin (e+f x) \cos (e+f x)}{8 a^2 c^2 f}+\frac {3 A x}{8 a^2 c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 73
Rule 199
Rule 205
Rule 639
Rule 3588
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{(a+i a x)^3 (c-i c x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{\left (a c+a c x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {(3 A) \operatorname {Subst}\left (\int \frac {1}{\left (a c+a c x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=\frac {3 A \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {(3 A) \operatorname {Subst}\left (\int \frac {1}{a c+a c x^2} \, dx,x,\tan (e+f x)\right )}{8 a c f}\\ &=\frac {3 A x}{8 a^2 c^2}+\frac {3 A \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 53, normalized size = 0.75 \[ \frac {A (12 (e+f x)+8 \sin (2 (e+f x))+\sin (4 (e+f x)))-8 B \cos ^4(e+f x)}{32 a^2 c^2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.86, size = 92, normalized size = 1.30 \[ \frac {{\left (24 \, A f x e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-i \, A - B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (-8 i \, A - 4 \, B\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (8 i \, A - 4 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, A - B\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{64 \, a^{2} c^{2} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.91, size = 67, normalized size = 0.94 \[ \frac {\frac {3 \, {\left (f x + e\right )} A}{a^{2} c^{2}} + \frac {3 \, A \tan \left (f x + e\right )^{3} + 5 \, A \tan \left (f x + e\right ) - 2 \, B}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2} a^{2} c^{2}}}{8 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.35, size = 236, normalized size = 3.32 \[ \frac {3 A}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )+i\right )}-\frac {i B}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )+i\right )}+\frac {3 i A \ln \left (\tan \left (f x +e \right )+i\right )}{16 f \,a^{2} c^{2}}+\frac {i A}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {B}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {3 A}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )-i\right )}+\frac {i B}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )-i\right )}-\frac {3 i A \ln \left (\tan \left (f x +e \right )-i\right )}{16 f \,a^{2} c^{2}}-\frac {i A}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {B}{16 f \,a^{2} c^{2} \left (\tan \left (f x +e \right )-i\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.50, size = 53, normalized size = 0.75 \[ \frac {3\,A\,x}{8\,a^2\,c^2}+\frac {{\cos \left (e+f\,x\right )}^4\,\left (\frac {3\,A\,{\mathrm {tan}\left (e+f\,x\right )}^3}{8}+\frac {5\,A\,\mathrm {tan}\left (e+f\,x\right )}{8}-\frac {B}{4}\right )}{a^2\,c^2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.73, size = 362, normalized size = 5.10 \[ \frac {3 A x}{8 a^{2} c^{2}} + \begin {cases} \frac {\left (\left (16384 i A a^{6} c^{6} f^{3} e^{2 i e} - 16384 B a^{6} c^{6} f^{3} e^{2 i e}\right ) e^{- 4 i f x} + \left (131072 i A a^{6} c^{6} f^{3} e^{4 i e} - 65536 B a^{6} c^{6} f^{3} e^{4 i e}\right ) e^{- 2 i f x} + \left (- 131072 i A a^{6} c^{6} f^{3} e^{8 i e} - 65536 B a^{6} c^{6} f^{3} e^{8 i e}\right ) e^{2 i f x} + \left (- 16384 i A a^{6} c^{6} f^{3} e^{10 i e} - 16384 B a^{6} c^{6} f^{3} e^{10 i e}\right ) e^{4 i f x}\right ) e^{- 6 i e}}{1048576 a^{8} c^{8} f^{4}} & \text {for}\: 1048576 a^{8} c^{8} f^{4} e^{6 i e} \neq 0 \\x \left (- \frac {3 A}{8 a^{2} c^{2}} + \frac {\left (A e^{8 i e} + 4 A e^{6 i e} + 6 A e^{4 i e} + 4 A e^{2 i e} + A - i B e^{8 i e} - 2 i B e^{6 i e} + 2 i B e^{2 i e} + i B\right ) e^{- 4 i e}}{16 a^{2} c^{2}}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________